import React, { Component } from 'react'

import './css/index.css'
import Child from './Child'

export default class App extends Component {
  state = {
    isCreated: true,
  }

  render() {
    return (
      <div>
        <h1>App</h1>
        <button
          onClick={() => this.setState({ isCreated: !this.state.isCreated })}
        >
          click
        </button>
        <div>{this.state.isCreated && <Child></Child>}</div>
      </div>
    )
  }
}
